Skip to content

Define custom pin mappings in wled.h#370

Open
kelteks78 wants to merge 3 commits into
MoonModules:mdevfrom
kelteks78:mdev
Open

Define custom pin mappings in wled.h#370
kelteks78 wants to merge 3 commits into
MoonModules:mdevfrom
kelteks78:mdev

Conversation

@kelteks78

@kelteks78 kelteks78 commented Jun 17, 2026

Copy link
Copy Markdown

Matrixboard

Summary by CodeRabbit

  • Chores
    • Updated LED hardware pin mappings to support controlling two separate RGB LED groups.
    • Added additional GPIO assignments required by the LED setup.
  • Build
    • Expanded the default build targets to include the ESP32-S3 (16MB OPI) environment, broadening supported firmware configurations.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3cb81f06-241b-40b5-a9bf-ff542820a071

📥 Commits

Reviewing files that changed from the base of the PR and between 1f899db and ee2fd0f.

📒 Files selected for processing (1)
  • platformio.ini
🚧 Files skipped from review as they are similar to previous changes (1)
  • platformio.ini

Walkthrough

wled00/wled.h adds a WLED_MY_PINS include guard block containing preprocessor directives for two RGB LED groups (R1/G1/B1, R2/G2/B2) and auxiliary GPIO pins (A_PINE_PIN, LAT_PIN, OE_PIN, CLK_PIN). platformio.ini adds esp32s3_16MB_OPI to the default build environments list and includes a commented example line.

Changes

Hardware Configuration for ESP32-S3 Variant

Layer / File(s) Summary
WLED_MY_PINS guarded pin assignments
wled00/wled.h
Adds a #ifndef WLED_MY_PINS guard block defining pin constants for two RGB LED channel groups and auxiliary/control GPIO pins.
ESP32-S3 OPI build environment
platformio.ini
Adds esp32s3_16MB_OPI to the default_envs list with a commented example reference, enabling it as a default build target for the PlatformIO build matrix.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Define custom pin mappings in wled.h' accurately and specifically summarizes the primary change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@wled00/wled.h`:
- Around line 1-17: The pin definitions (R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN,
B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN, OE_PIN, CLK_PIN) in the
WLED_MY_PINS block do not match the HUB75 pin order documented in
bus_manager.cpp. Verify the correct pin mapping against the board schematic and
update each pin definition to match the proper HUB75 wiring order. Additionally,
if this header file is used by multiple build targets, scope the WLED_MY_PINS
block with a conditional preprocessor directive to apply these pin definitions
only to the Matrixboard build.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4b08eb68-bebb-4ce5-8929-9f6fb4de6d39

📥 Commits

Reviewing files that changed from the base of the PR and between c850a8c and 65fc0cf.

📒 Files selected for processing (1)
  • wled00/wled.h

Comment thread wled00/wled.h
Comment on lines +1 to +17
#ifndef WLED_MY_PINS
#define WLED_MY_PINS
#define R1_PIN 42
#define G1_PIN 41
#define B1_PIN 40
#define R2_PIN 39
#define G2_PIN 38
#define B2_PIN 45
#define A_PIN 1
#define B_PIN 2
#define C_PIN 3
#define D_PIN 4
#define E_PIN 5
#define LAT_PIN 6
#define OE_PIN 7
#define CLK_PIN 8
#endif

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Align this pinout with the Matrixboard wiring contract.

These values don’t match the HUB75 pin order documented in bus_manager.cpp, so the matrix driver will be wired incorrectly on the target board. Please verify the mapping against the actual board schematic, and scope this block to the Matrixboard build only if this header is shared by other targets.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wled00/wled.h` around lines 1 - 17, The pin definitions (R1_PIN, G1_PIN,
B1_PIN, R2_PIN, G2_PIN, B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN,
OE_PIN, CLK_PIN) in the WLED_MY_PINS block do not match the HUB75 pin order
documented in bus_manager.cpp. Verify the correct pin mapping against the board
schematic and update each pin definition to match the proper HUB75 wiring order.
Additionally, if this header file is used by multiple build targets, scope the
WLED_MY_PINS block with a conditional preprocessor directive to apply these pin
definitions only to the Matrixboard build.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@platformio.ini`:
- Line 108: The environment name esp32s3_16MB_OPI is referenced in the
default_envs list but lacks a corresponding environment section definition in
platformio.ini. To fix this, you must either add a new [env:esp32s3_16MB_OPI]
section with the appropriate board configuration and build settings to match the
other environment definitions in the file, or remove esp32s3_16MB_OPI from the
default_envs list if this environment is not needed. Choose the appropriate
action based on whether you intend to support building for this ESP32-S3
variant.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9cf2e36b-62e3-4f7d-bf81-6f17765c2ff4

📥 Commits

Reviewing files that changed from the base of the PR and between 65fc0cf and 1f899db.

📒 Files selected for processing (1)
  • platformio.ini

Comment thread platformio.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant